package com.robot.dao.vo;

import com.alibaba.fastjson.JSONObject;
import lombok.*;
import java.io.Serializable;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SearchingDetailVO implements Serializable {
//    private Boolean isNeedWebSearch;
    private ActionUnitOverViewVO actionUnit;
    private Boolean isNeedWebSearching;

    public void setActionUnitDetail(String webSearchingDetail) {
        JSONObject jsonObject = JSONObject.parseObject(webSearchingDetail, JSONObject.class);
        WebSearchingDetail webSearchingDetail1 = new WebSearchingDetail();
        webSearchingDetail1.setSearchLinkMaxNum(jsonObject.getInteger("searchLinkMaxNum"));
        webSearchingDetail1.setSearchLinkNum(jsonObject.getInteger("searchLinkNum"));
        this.actionUnit.setDetail(webSearchingDetail1);
    }
    @Setter
    @Getter
    static class WebSearchingDetail implements Serializable{
        private Integer searchLinkMaxNum;
        private Integer searchLinkNum;
    }
}
